# -*- codeing = utf-8 -*-
import requests
from bs4 import BeautifulSoup
URL = 'http://book.zongheng.com/showchapter/1007117.html'
headers = {
    'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3877.400 QQBrowser/10.8.4506.400'
}
resp = requests.get(url=URL,headers=headers)
resp.encoding = 'UTF-8'
#print(resp.text)
soup = BeautifulSoup(resp.text,'lxml')
soup_list = soup.select('body > div.container > div')
for i in soup_list:
    #print(i)
    if i.select_one('div') != None:
        text_t = i.select_one('div:nth-child(2)').text
        text_t1 = '\n'.join(text_t.split())
        print(text_t1)